Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument obsreport.Processor #36

Merged
merged 6 commits into from
Nov 22, 2022

Conversation

moh-osman3
Copy link

Description:

This PR instruments obsreport.Processor with otel go. This is a followup PR that is based on similar changes made for obsreport.Receiver: open-telemetry#6222

Link to tracking Issue: Part of open-telemetry#816

Testing:
Ran contrib collector with memory_limiter processor and prometheusreceiver + sent traces from demo client and confirmed that new metrics show up. Tested both with feature gate disabled and enabled.

From output of $ curl localhost:8888/metrics

# HELP otelcol_processor_accepted_metric_points Number of metric points successfully pushed into the next component in the pipeline.
# TYPE otelcol_processor_accepted_metric_points counter
otelcol_processor_accepted_metric_points{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 298
# HELP otelcol_processor_accepted_spans Number of spans successfully pushed into the next component in the pipeline.
# TYPE otelcol_processor_accepted_spans counter
otelcol_processor_accepted_spans{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 84
# HELP otelcol_processor_dropped_metric_points Number of metric points that were dropped.
# TYPE otelcol_processor_dropped_metric_points counter
otelcol_processor_dropped_metric_points{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 0
# HELP otelcol_processor_dropped_spans Number of spans that were dropped.
# TYPE otelcol_processor_dropped_spans counter
otelcol_processor_dropped_spans{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 0
# HELP otelcol_processor_refused_metric_points Number of metric points that were rejected by the next component in the pipeline.
# TYPE otelcol_processor_refused_metric_points counter
otelcol_processor_refused_metric_points{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 0
# HELP otelcol_processor_refused_spans Number of spans that were rejected by the next component in the pipeline.
# TYPE otelcol_processor_refused_spans counter
otelcol_processor_refused_spans{processor="memory_limiter",service_instance_id="d957e470-f4a9-4448-b0b9-e2a2e98a2b53",service_name="otelcontribcol",service_version="v0.63.0-48-ge9099f1c57"} 0

Copy link

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great :D

@moh-osman3 moh-osman3 merged commit 57b2ea4 into main Nov 22, 2022
@moh-osman3 moh-osman3 deleted the mohosman/updated-instrument-processor branch November 22, 2022 17:19
jaronoff97 added a commit that referenced this pull request Dec 14, 2022
* initial processor instrumentation

* adding some tests

* add obsreporttest unit tests for processor

* refactor common code

* rebase and  update pr

* fix indentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants